package com.springtiles.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class HelloController {
	Logger log = LoggerFactory.getLogger(HelloController.class);
	
	/**
	 * 一个Controller可以处理多个URL
	 * @return
	 */
	@RequestMapping(value = "/hello.do", method = RequestMethod.GET)
	public String showhello() {
		log.info("showhello");
		return "hello";
	}
	
	/**
	 * 一个Controller可以处理多个URL
	 * @return
	 */
	@RequestMapping(value = "/user.do", method = RequestMethod.GET)
	public String showuser() {
		log.info("showuser");
		return "user";
	}
}
